PowerTCP Telnet for ActiveX
PowerTCP Visual C++ Notes

Each development environment has it's own unique way of supporting ActiveX controls. Visual Basic, for example, offers superb support for using controls both on forms (by adding it to the component bar and dragging it onto a form) and off forms (by instantiating them at run-time using "Dim" and "Set" constructs). In Visual C++ it is a little harder, and there are different techniques possible using MFC and "straight" WIN32.

MFC Support for ActiveX

MFC provides direct support for placing a control on a form. Using the ClassWizard, you then reference the control ID, add a variable, and then add event handles for each event. This mechanism works well with Dart PowerTCP controls, but has the following shortcomings that require a workaround:

  1. When you insert a control, the resource file caches license information. When you use the control as a trial and subsequently purchases a license, you must manually remove the control and then read it so that the license information is properly included and passes the license check at run time.
  2. When Dart ships the sample as part of PowerTCP for ActiveX, it must be shipped with the control missing, so the application does not compile as shipped (the control must be added first, even to operate as a trial).
  3. You cannot use this technique for non-MFC or formless applications, such as console applications, service applications, ATL controls, "straight" WIN32 applications, and other C++ environments (such as Borland C++ and C++ Builder).

To work around these limitations, many Dart controls have already been upgraded to provide the following benefit.

Class Support for ActiveX

Dart has provided a "wrapper" class for many controls (and objects) that uses licensing, such that:

  1. Developers may not be familiar with using using the C function to create a licensed control (CoComCreateInstanceLic). Dart has provided a Create() method to handle the instantiation of a licensed control.
  2. Developers may also be unfamiliar with manually adding event support. Dart has provided code to create this connection within the class.
  3. You can uses these classes in any C++ environment, simplifying the use of our product in these environments.
  4. Samples will compile right out of the box.

 


Documentation Version 1.9.3.0
© 2020 Dart Communications. All Rights Reserved.
Send comments on this topic